COM AT+CGDSCONT - Define secondary PDP context
COM V1.1	06.01.2005	T. Kleinmann	started
COM V1.2	07.01.2005	T. Kleinmann	several improvements

from attglobals import *

COM <H2>Check that this is the right way to test the command </H2>

# Activate extended error messages in text mode 
AT+CMEE=2
WAIT FOR OK

#Define PDP context for template first
ATCMD(1,'AT+CGDCONT=1,"IP","',AccessPointName,'"')
WAIT FOR OK

#Read CGDCONT
AT+CGDCONT?
WAITFOR (1,'+CGDCONT:')

#Check CGDSCONT
AT+CGDSCONT=?
WAITFOR (1,'+CGDSCONT:')

#Activate PDP context 1
AT+CGACT=1,1
WAIT FOR OK

#Define secondary PDP context
AT+CGDSCONT=2,1
WAIT FOR OK

AT+CGDSCONT?
WAITFOR (1,'+CGDSCONT: 2,1')

#Undefine Secondary PDP context
AT+CGDSCONT=2
WAIT FOR OK

#Deactivate contexts
AT+CGACT=0
WAIT FOR OK

AT
WAIT FOR OK
